// 订单列表
import InputComponents from "../../Purchase/InputComponents";
import React from 'react'
import OrderListTab from "./OrderListTab";
import ReturnList from "../ReturnList";
import './OrderList.css'

const OrderList = () => {

    // 业务员表单的相关数据
    let salesmanValue = null;
    const salesmanData = [
        { id: 1, value: '李雷' },
        { id: 2, value: '韩梅梅' },
        { id: 3, value: '李华' }
    ]
    const salesman = (a) => {
        salesmanValue = a
        return console.log('父组件获取的值：', salesmanValue)
    }
    //付款状态下拉框相关数据
    let paymentStatusValue = null;
    const paymentStatusData = [
        { id: 1, value: '待付款' },
        { id: 2, value: '未发货' },
        { id: 3, value: '代收货' },
        { id: 4, value: '已收货' },
    ]
    const paymentStatus = (a) => {
        paymentStatusValue = a
        return console.log('父组件获取的值：', paymentStatusValue)
    }
    //配送车辆下拉框
    let carValue = null;
    const carData = [
        { id: 1, value: '待付款' },
        { id: 2, value: '未发货' },
        { id: 3, value: '代收货' },
        { id: 4, value: '已收货' },
    ]
    const car = (a) => {
        carValue = a
        return console.log('父组件获取的值：', carValue)
    }
    //出库仓库下拉框
    let warehouseValue = null;
    const warehouseData = [
        { id: 1, value: '待付款' },
        { id: 2, value: '未发货' },
        { id: 3, value: '代收货' },
        { id: 4, value: '已收货' },
    ]
    const warehouse = (a) => {
        warehouseValue = a
        return console.log('父组件获取的值：', warehouseValue)
    }
    // 测试
    const test = (e) => {
        console.log('事件对象', e)

    }
    var a = '1'
    return (
        <div className="OrderList">
            <div className="OrderList-1">
                <div className="OrderList-top1">
                    <div>
                        <InputComponents  InputValue={paymentStatusData} passData={paymentStatus} placeholder='待付款' />
                    </div>
                    <div>
                        <InputComponents InputValue={salesmanData} passData={salesman} placeholder='业务员' />
                    </div>
                    <div>
                        <InputComponents InputValue={carData} passData={car} placeholder='配送车辆' />
                    </div>
                    <div>

                        <InputComponents InputValue={warehouseData} passData={warehouse} placeholder='出库仓库' />
                    </div>
                    <div>
                        <button className="OrderList-btn" onClick={test}>重置</button>
                    </div>

                </div>
                <div className="OrderList-top2"></div>
                <OrderListTab />
                <ReturnList />
            </div>


        </div>
    )
}

export default OrderList;